﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace MG_WIN.Windows
{
    public partial class BaseWin : Form
    {
        public BaseWin()
        {
            InitializeComponent();
        }

        private void btnKeyboard_Click(object sender, EventArgs e)
        {
            Process p = null;
            p = new Process();
            p.StartInfo.FileName = "cmd.exe";
            p.StartInfo.UseShellExecute = false;
            p.StartInfo.RedirectStandardInput = true;
            p.StartInfo.RedirectStandardOutput = true;
            p.StartInfo.RedirectStandardError = true;
            p.StartInfo.CreateNoWindow = true;
            p.Start();
            p.StandardInput.WriteLine("osk.exe");
            p.Close();
        }

        //private void BaseWin_FormClosing(object sender, FormClosingEventArgs e)
        //{
        //    if (MessageBox.Show("QUIT SYSTEM?","QUIT", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)== DialogResult.OK)
        //        Application.ExitThread();
        //    else
        //        e.Cancel = true;
        //}
    }
}